package com.hirsi.common.core.validator.annotation;

import com.hirsi.common.core.validator.RangeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Constraint(validatedBy = RangeValidator.class)
public @interface Range {

    int min() default 0;

    int max() default 100;

    boolean ignoreNull() default false;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
